package com.hfut.wxy.entity.mysql;

import com.hfut.wxy.common.parent.WxyBase;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.Email;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "wxyuserinfo")
@DynamicInsert
@DynamicUpdate
public class WxyUserInfo extends WxyBase {
    @Column(updatable = false,columnDefinition = "varchar(50) binary not null comment 'openid'")
    private String openid;

    @Column( columnDefinition = "varchar(10) binary  comment '学号或用户名'")
    private String username;

    @Column(columnDefinition = "varchar(32) binary  comment '密码'")
    private String password;

    @Column(columnDefinition = "varchar(10) binary comment '姓名'")
    protected String name;

    @Column(columnDefinition = "varchar(10) binary  comment '学院专业'")
    protected String major;

    @Column(columnDefinition = "varchar(11)  DEFAULT '' COMMENT '手机号'")
    private String phone;

    @Column(columnDefinition = "integer(4) DEFAULT null COMMENT '入学届'")
    private Integer year;

    @Column(columnDefinition = "varchar(50) binary DEFAULT '' COMMENT '联系地址'")
    private String address;

    @Column(columnDefinition = "varchar(200) binary DEFAULT '' COMMENT '联系地址'")
    private String avatarUrl;

    @Column(columnDefinition = "varchar(16) binary DEFAULT '' COMMENT '昵称'")
    private String nickName;

    @Column(columnDefinition = "float(7,2) comment '兑换币余额'")
    private Float balance;

    @Column(columnDefinition = "integer")
    private Integer schoolId;

}
